package com.santiao.youxiang.ui.activity

import android.content.Context
import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.gyf.immersionbar.ImmersionBar
import com.santiao.publics.ui.SettingFragment
//import com.lazyliuzy.commonui.utils.lzy.LZYADSUtils
import kotlin.apply
//import kotlin.jvm.java
import com.santiao.youxiang.databinding.ActivityAddSelectBinding

import com.santiao.youxiang.ext.thrillClickListener

class SelectAccountActivity: AppCompatActivity() {
    private lateinit var binding: ActivityAddSelectBinding
//    private lateinit var lzyadsUtils: com.lazyliuzy.commonui.utils.lzy.LZYADSUtils
var type_a="" //1 医保 2：社保

    var slePosition=1

    var struri=""
    // 在类顶部定义
    val REQUEST_STORAGE_PERMISSION = 1001  // 可以是任意唯一整数

    companion object {
        // 定义一个静态方法来创建Intent
        // 定义一个静态方法来创建Intent并携带uri数据
        fun startActivity(context: Context?/*, type: String*/) {

            val intent = Intent(context, SelectAccountActivity::class.java).apply {

//                putExtra("type", type)

            }

            context!!.startActivity(intent)
        }

    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = ActivityAddSelectBinding.inflate(layoutInflater)
        setContentView(binding?.root)
//        type_a= intent.getStringExtra("type").toString()
        ImmersionBar.with(this)
            .transparentStatusBar()
            .statusBarDarkFont(true)
            .transparentNavigationBar()
            .init()
        initViews(type_a)

        SettingFragment.adLoad2(0,null,binding.flContent3,this,this)
    }



     fun initViews(type: String) {
//        initad()

         initclick()


        binding.ivBack.setOnClickListener { onBackPressed() }





    }

    fun initclick(){

        binding.llQq.thrillClickListener {
            AddAccountActivity.startActivity(this,"1")
        }

        binding.llE163.thrillClickListener {
            AddAccountActivity.startActivity(this,"2")
        }

        binding.llE126.thrillClickListener {
            AddAccountActivity.startActivity(this,"3")
        }




    }

    fun switchItem(position: Int) {

    }






    fun   initad() {
//        myContext = requireContext()
//        lzyadsUtils=
//            com.lazyliuzy.commonui.utils.lzy.LZYADSUtils("Task1Activity", this@Task1Activity)
//        com.lazyliuzy.commonui.utils.lzy.LZYADSUtils.loadSimpleAd1(com.lazyliuzy.commonui.databinding.ActivityTask1Binding.flAd)
//        com.lazyliuzy.commonui.utils.lzy.LZYADSUtils.showAdCpTurn()

    }

}